package com.p2p.common.base;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 模型基类
 *
 * @author Allen
 */
public class BaseModel implements Serializable {

    private static final long serialVersionUID = -4674107480371416651L;
    private Long id;

    private Integer status;
    // 最后更新时间
    private Timestamp lastUpdateTime;
    // 数据创建时间
    private Timestamp createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Timestamp getLastUpdateTime() {
        if (lastUpdateTime == null) {
            return new Timestamp(System.currentTimeMillis());
        } else {
            return lastUpdateTime;
        }

    }

    public void setLastUpdateTime(Timestamp lastUpdateTime) {

        this.lastUpdateTime = lastUpdateTime;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

}

